/**
 * Vue i18n loader
 * created by @musnow
 * https://github.com/musnow
 */
import Vue from 'vue';
import VueI18n from 'vue-i18n';
// default language
import enUS from './lang/en-US';
import zhCN from './lang/zh-CN';
import esES from './lang/es-ES';
import jaJp from './lang/ja-JP';
// change default accept-language


Vue.use(VueI18n);

export const defaultLang = 'zh-CN';

const messages = {
  'en-US': {
    ...enUS
  },
  'zh-CN': {
    ...zhCN
  },
  'es-ES': {
    ...esES
  },
  'ja-JP': {
    ...jaJp
  }
}

const i18n = new VueI18n({
  locale: defaultLang,
  fallbackLocale: defaultLang,
  messages
})

export default i18n

